home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / src-server / xlisp / Makefile.NeXT < prev    next >
Encoding:
Makefile  |  1991-11-22  |  8.6 KB  |  267 lines

  1. ################################################################################
  2. #
  3. # File:         Makefile.NeXT
  4. # RCS:          $Header: Makefile.NeXT,v 1.2 91/03/25 03:55:44 mayer Exp $
  5. # Description:  Makefile for WINTERP's libXlisp.a on generic machine
  6. # Author:       Niels Mayer, HPLabs
  7. # Created:      Mon Oct 23 21:00:37 1989
  8. # Modified:     Thu Nov 21 22:08:39 1991
  9. # Language:     N/A
  10. # Package:      N/A
  11. # Status:       X11r5 contrib tape release
  12. #
  13. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  14. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  15. #
  16. # Permission to use, copy, modify, distribute, and sell this software and its
  17. # documentation for any purpose is hereby granted without fee, provided that
  18. # the above copyright notice appear in all copies and that both that
  19. # copyright notice and this permission notice appear in supporting
  20. # documentation, and that the name of Hewlett-Packard and David Betz not be
  21. # used in advertising or publicity pertaining to distribution of the software
  22. # without specific, written prior permission.  Hewlett-Packard and David Betz
  23. # make no representations about the suitability of this software for any
  24. # purpose. It is provided "as is" without express or implied warranty.
  25. #
  26. # HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  27. # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  28. # IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  29. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  31. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  32. # PERFORMANCE OF THIS SOFTWARE.
  33. #
  34. # See ./winterp/COPYRIGHT for information on contacting the authors.
  35. #
  36. # Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  37. # Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  38. #
  39. ################################################################################
  40.  
  41. #
  42. # Note on INCLUDES for Motif 1.0:
  43. # ==============================
  44. # Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
  45. # make sure that you are compiling Motif 1.0 programs with the headers
  46. # associated with Motif 1.0, not the X11r4 headers.
  47. #
  48. # Standard locations for Motif includes are /usr/include/X11 and
  49. # /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
  50. # intrinsics headers which are installed in /usr/include/X11. Don't
  51. # confuse these    with the incompatible Xtoolkit intrinsics from X11r4.
  52. #
  53. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
  54. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  55. # (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  56. # TO THE APPROPRIATE LOCATION.
  57. #
  58. #
  59. # Note on INCLUDES for Motif 1.1:
  60. # ==============================
  61. # Motif 1.1 uses the X11r4 Xlib, libXt, etc, however, Motif 1.1 is not
  62. # included as part of the X11r4 distribution.  Make sure that you either
  63. # have the X11r4 and Motif headers installed, or that you are setting
  64. # INCLUDES so that the appropriate include directories are used.
  65. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
  66. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  67. # (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  68. # TO THE APPROPRIATE LOCATION.
  69. #            --------------------
  70. # NOTE: if you modify INCLUDES below, you must also do the same 
  71. # modification in ../Makefile.NeXT
  72. #
  73.  
  74. # INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11 -I/mnt0/src/X11r4/mit -I/mnt0/src/X11r4/mit/X11
  75. INCLUDES = -I. -I/usr/include
  76.  
  77.  
  78. #
  79. # Note on DEFINES:
  80. # (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
  81. # WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
  82. # for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
  83. #
  84. # (2) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
  85. # non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
  86. # and at that point this flag should be removed.
  87. #
  88. # Other defines that may be required: See Imake rules for your particular
  89. # machine to find out whether -DMALLOC_0_RETURNS_NULL is required
  90. # for linking with the fast malloc library "-lmalloc". Some machines
  91. # don't have a fast malloc library, in which case, don't bother.
  92. #
  93. # WINTERP uses BSD networking to implement the eval-server. Some machines
  94. # don't include BSD stuff by default. You should check the Imake rules
  95. # for your particular machine to see if you need to define things like
  96. # -DBSD or -DSYSV. IBM AIX 3.1 supposedly requires "-D_BSD" and also requires
  97. # linking with libbsd.a
  98. #            --------------------
  99. # NOTE: if you modify DEFINES below, you must also do the same 
  100. # modification in ../Makefile.NeXT
  101. #
  102.  
  103. # DEFINES = -DWINTERP -DSYSV -Dhpux -DMALLOC_0_RETURNS_NULL -D_NO_PROTO $(USER_DEFINES)
  104. DEFINES = -bsd -DWINTERP -D_NO_PROTO $(USER_DEFINES)
  105.  
  106.  
  107. #
  108. # Include any machine-specific compiler options in CFLAGS
  109. #
  110.  
  111. # CFLAGS = $(INCLUDES) -Wc,-Nd4000,-Ns3300,-Ne700,-Np1000 $(DEFINES)
  112. CFLAGS = $(INCLUDES) $(DEFINES)
  113.  
  114. #
  115. # Some machines (Sun?) have buggy optimizers that make the programs behave
  116. # strangely. Turn off optimization if you suspect problems, or if you have a
  117. # known flaky compiler.
  118. #
  119. OPTIMIZER = -O
  120.  
  121.  
  122. ##############################################################################
  123. LINT = /usr/bin/lint
  124. .SUFFIXES: .ln .c
  125. .c.ln:
  126.     $(LINT) -c $*.c $(DEFINES)
  127.  
  128.  
  129. ##############################################################################
  130. .c.o:
  131.     $(CC) -c $(OPTIMIZER) $*.c $(CFLAGS)
  132.  
  133.  
  134. ##############################################################################
  135. HDRS          = osdefs.h \
  136.         osptrs.h \
  137.         xldmem.h \
  138.         xlisp.h
  139.  
  140. SRCS          = unixstuff.c \
  141.         xlbfun.c \
  142.         xlcont.c \
  143.         xldbug.c \
  144.         xldmem.c \
  145.         xleval.c \
  146.         xlfio.c \
  147.         xlglob.c \
  148.         xlimage.c \
  149.         xlinit.c \
  150.         xlio.c \
  151.         xljump.c \
  152.         xllist.c \
  153.         xlmath.c \
  154.         xlobj.c \
  155.         xlpp.c \
  156.         xlprin.c \
  157.         xlread.c \
  158.         xlstr.c \
  159.         xlstruct.c \
  160.         xlsubr.c \
  161.         xlsym.c \
  162.         xlsys.c
  163.  
  164. OBJS          = $(SRCS:.c=.o)
  165.  
  166. LINTS          = $(SRCS:.c=.ln)
  167.  
  168. ##############################################################################
  169. DEST          = .
  170.  
  171. INSTALL          = install
  172.  
  173. LIBRARY          = libXlisp.a
  174.  
  175. LINT_LIB      = llib-Xlisp.ln
  176.  
  177. MAKEFILE      = Makefile.NeXT
  178.  
  179. PRINT          = pr
  180.  
  181. SHELL          = /bin/sh
  182.  
  183. all::        $(LIBRARY)
  184.  
  185. $(LIBRARY):    $(OBJS)
  186.         @echo "Loading $(LIBRARY) ..."
  187.         ar cruv $(LIBRARY) $(OBJS)
  188.         ranlib $(LIBRARY)
  189.         @echo "$(LIBRARY) done"
  190.  
  191. $(LINT_LIB):    $(LINTS)
  192.         @echo "Loading $(LINT_LIB) ..."
  193.         $(LINT) -o Xlisp -x $(LINTS)
  194.         @echo "$(LINT_LIB) done"
  195.  
  196. lisp::
  197.         @echo "Making XLISP ..."
  198.         @echo "    Deleteing WINTERP *.o files for recompiling xlisp sources without -DWINTERP."
  199.         rm -f $(OBJS) xlisp.o xlftab.o
  200.         make -f Makefile.NeXT "CFLAGS=-DUNIX" "OPTIMIZER=-O" xlisp
  201.         @echo "    Deleteing XLISP *.o files to ensure future WINTERP compilations uses XLISP sources compiled with -DWINTERP."
  202.         rm -f $(OBJS)
  203.         @echo "Done Making XLISP."
  204.  
  205. #
  206. # Note that if you've compiled winterp previously, you should delete the *.o
  207. # files in this directory, since those were compiled with -DWINTERP which will
  208. # require that extra X11/Motif/Winterp code be linked in with the exectable.
  209. #        
  210. xlisp:        xlisp.o xlftab.o $(OBJS)
  211.         @echo "    Loading XLISP ..."
  212.         $(CC) -O -s -o xlisp xlisp.o xlftab.o $(OBJS) -lm -lmalloc
  213.         @echo "    done"
  214.  
  215. clean:;        rm -f $(OBJS) $(LINTS) core xlisp.o xlftab.o
  216.  
  217. clobber:;    rm -f $(OBJS) $(LIBRARY) $(LINTS) $(LINT_LIB) core tags xlisp xlisp.o xlftab.o
  218.  
  219. depend:;    mkmf -f $(MAKEFILE) ROOT=$(ROOT)
  220.  
  221. echo:;        @echo $(HDRS) $(SRCS)
  222.  
  223. extract:;    ar x $(DEST)/$(LIBRARY)
  224.  
  225. index:;        ctags -wx $(HDRS) $(SRCS)
  226.  
  227. install:    $(LIBRARY)
  228.         @echo Installing $(LIBRARY) in $(DEST)
  229.         if [ $(DEST) != . ]; then \
  230.         (rm -f $(DEST)/$(LIBRARY); $(INSTALL) -f $(DEST) $(LIBRARY)); fi
  231.  
  232. print:;        $(PRINT) $(HDRS) $(SRCS)
  233.  
  234. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  235.  
  236. update:         $(DEST)/$(LIBRARY)
  237.  
  238. $(DEST)/$(LIBRARY): $(SRCS) $(HDRS)
  239.         $(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install
  240. ###
  241. unixstuff.o:    xlisp.h xldmem.h
  242. xlbfun.o:    xlisp.h xldmem.h
  243. xlcont.o:    xlisp.h xldmem.h
  244. xldbug.o:    xlisp.h xldmem.h
  245. xldmem.o:    xlisp.h xldmem.h
  246. xleval.o:    xlisp.h xldmem.h
  247. xlfio.o:    xlisp.h xldmem.h
  248. xlftab.o:    xlisp.h xldmem.h
  249. xlglob.o:    xlisp.h xldmem.h
  250. xlimage.o:    xlisp.h xldmem.h
  251. xlinit.o:    xlisp.h xldmem.h
  252. xlio.o:        xlisp.h xldmem.h
  253. xlisp.o:    xlisp.h xldmem.h
  254. xljump.o:    xlisp.h xldmem.h
  255. xllist.o:    xlisp.h xldmem.h
  256. xlmath.o:    xlisp.h xldmem.h
  257. xlobj.o:    xlisp.h xldmem.h
  258. xlpp.o:        xlisp.h xldmem.h
  259. xlprin.o:    xlisp.h xldmem.h
  260. xlread.o:    xlisp.h xldmem.h
  261. xlstr.o:    xlisp.h xldmem.h
  262. xlstruct.o:    xlisp.h xldmem.h
  263. xlsubr.o:    xlisp.h xldmem.h
  264. xlsym.o:    xlisp.h xldmem.h
  265. xlsys.o:    xlisp.h xldmem.h
  266.